package com.javabase;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @Description: java类作用描述
 * @Author: Bsea
 * @CreateDate: 2019/6/7$ 21:54$
 */
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@interface MethodAnno {
    FiledAnnoName setAnnoName() default @FiledAnnoName;

    FiledAnnoAge setAnnoAge() default @FiledAnnoAge;

    String method() default "method";
}


@Target(ElementType.FIELD)//全局变量
@Retention(RetentionPolicy.RUNTIME)//运行时注解
@interface FiledAnnoAge {
    int age() default 0;//注解 构造方法无参 必须有默认值
}

@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
@interface FiledAnnoName {
    String value() default "";
}
